<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/common/taglib.jsp" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>论坛菜单</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="StyleSheet" href="${skinPath}/dtree.css" type="text/css"/>
    <script type="text/javascript" src="${ctx}/js/dtree/dtree.js"></script>
</head>
<body>
<div class="dtree">
    <br>${settings['bbname']}
<br><br>

    <script type="text/javascript">
        <!--
        d = new dTree('d', '${skinPath}/imgs/dtree/');
        d.add(0, -1, '论坛首页', '${ctx}/index.do',true);
        d.add(11000, 0, '精华区', '${ctx}/index.do',true);
        d.add(12000, 0, '查看新帖', '${ctx}/index.do',true);

        <c:forEach items="${actionBean.forums}" var="forum" varStatus="status">
        <c:choose>
        <c:when test="${forum.type==0}">
        d.add(${forum.id}, ${forum.parentId}, '${forum.name}','${ctx}/index.do?groupId=${forum.id}');
        </c:when>
        <c:otherwise>
        d.add(${forum.id}, ${forum.parentId}, '${forum.name}', '${ctx}/forum.do?forumId=${forum.id}');
        </c:otherwise>
        </c:choose>
        </c:forEach>


        <c:if test="${not empty sessionScope.user}">
         d.add(10000, 0, '控制面板');
        d.add(10001, 10000, '修改密码', 'editPassword-page.action');
        d.add(10002, 10000, '修改注册信息', 'editUser-page.action');
        d.add(10003, 10000, '我的帖子', 'myTopics.action');
        d.add(10003, 10000, '我的收藏', 'myFavorites.action');
        d.add(10004, 10000, '消息管理', 'myMessages.action');
        d.add(10005, 10000, '文件管理', 'userAttachments.action');
        </c:if>

        d.config.target = "main";
        d.config.closeSameLevel = true;
        d.config.useIcons = true;
        document.write(d);
                //d.show()
        //d.openTo(1);
        //-->
    </script>
</div>
<br/>

<div style="font-size:12px;"><a href="mailto:${settings['contactemail']}">${settings['contactemail']}</a></div>
</body>
</html>
